# toolchain.cmake

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

# 设置交叉编译器
set(CMAKE_C_COMPILER ${CROSS_COMPILE} /home/joke/toolchains/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc)  # 指定 C 编译器
set(CMAKE_CXX_COMPILER ${CROSS_COMPILE} /home/joke/toolchains/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++) # 指定 C++ 编译器